"use strict"
const mvc = require("cosjs.mvc");
const handle = mvc.library("handle","表单字段","branch/forms/fields")
handle.view = 'forms/fields';
handle.format = 'branch/forms/fields';

exports.index = function(){
    let data = {};
    data["fid"] = this.get("fid");
    if(!data["fid"]){
        return this.error("fid empty")
    }
    return Promise.resolve().then(()=>{
        return handle.index.call(this,data)
    })
}
//游戏服务器列表管理
exports.page = function (){
    let fid = this.get("fid",'string');
    if(!fid){
        return this.error("fid empty")
    }
    let query = {"fid":fid};
    let sort = {"sort":1};
    return handle.page.call(this,query,sort);
};

exports.save = handle.save;